Agent Log — 2026-04-26 — Enquiry Form Field Fix

Issue

Form at sales-training/enquiry/index.html stuck on "SENDING..." when submitted from browser. Curl test passed because curl used correct field names manually.

Root Cause

Field name mismatch in the JS submit handler payload:

Form sent Worker expected
participants pax
dates tentative_date
(missing) company_address
(missing) venue

document.getElementById('participants') and document.getElementById('dates') return null (those IDs do not exist in the HTML). Calling .value on null throws a TypeError. The try/catch catches it and re-enables the button — but only after the async fetch is already in flight with a broken payload. The worker receives pax: undefined and tentative_date: undefined, proceeds to Puppeteer PDF generation, which takes 10–30s, and the form fetch has no timeout — so the browser waits indefinitely (Cloudflare 30s CPU wall eventually kills it).

The form HTML already had the correct IDs: id="pax" and id="tentative_date". The bug was only in the JS payload object.

Fix Applied

File: sales-training/enquiry/index.html

Corrected the payload in the submit handler:

Verification

Status

Fix committed. Redeploy the static site (or CF Pages will auto-deploy on push).